%% GEN_PATH_TRAJ 
% Routine that calculate the trajectory starting from the data retrieved
% from the user.

global workspace_data;

points = [];

for i = 1:length(workspace_data.traj_m)-1
    points = [points; path_plan(workspace_data.traj_m(i,:), workspace_data.traj_m(i+1,:))];
end


workspace_data.traj_m = points;
workspace_data.traj_px = zeros(size(workspace_data.traj_m));
workspace_data.traj_px(:,1) = int32(workspace_data.traj_m(:,1).*workspace_data.px_to_m_y);
workspace_data.traj_px(:,2) = int32(workspace_data.traj_m(:,2).*workspace_data.px_to_m_y);
